package com.dayuan.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.dayuan.bean.Goods;
import com.dayuan.dao.GoodsMapper;

@Service
public class GoodsService {
	@Resource(name="goodsMapper")
	private GoodsMapper gm;
	

	/* 根据商品名称或者直接查询商品详情表所有物品（模糊查询） */
	public List<Goods> selectGoodsAll(String goodsName){
		List<Goods> result =  gm.selectGoodsAll(goodsName);
		return result;
	}
	
	 /*根据商品id查询商品类容（商品详情页面用） */
	public Goods selectGoodsAllById(Integer id){
		return gm.selectGoodsAllById(id);
	}
	
}
